<?php

namespace Common\Model;


class AdModel extends BaseModel
{
    protected $_auto = [
        ['created_at', 'time', self::MODEL_INSERT, 'function'],
    ];

    protected $_validate = [
    ];

    protected $_scope = [];

    
    protected function _after_find(&$record, $options)
    {
        if (isset($record['pic'])) {
            $record['pic'] = auto_prefix($record['pic']);
        }
    }

    protected function _after_select(&$records, $options)
    {
        foreach ($records as &$record) {
            $this->_after_find($record, $options);
        }   
    }

}
